import request from "../utils/request";

//查询部门
export const queryAllDept=()=>{
    return request.get('/depts');
};

//添加部门
export const addDeptApi=(dept)=>{
    return request.post('/depts',dept);
};

//根据id查询部门
export const queryByIdApi=(id)=>{
    return request.get(`/depts/${id}`);
};

//修改部门
export const updateApi=(dept)=>{
    return request.put('/depts',dept);
};

//删除部门
export const deleteByIdApi=(id)=>{
    return request.delete(`/depts?id=${id}`);
};
